/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background-color: #ff6700;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.search-box {
    display: flex;
    width: 500px;
    margin: 0 20px;
}

.search-box input {
    flex: 1;
    padding: 8px 15px;
    border: none;
    outline: none;
    border-radius: 3px 0 0 3px;
}

.search-box button {
    padding: 8px 15px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
}

.nav a:hover {
    text-decoration: underline;
}

/* 轮播图样式 */
.slider {
    height: 400px;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

.slides {
    display: flex;
    width: 300%;
    animation: slide 10s infinite;
}

.slides img {
    width: 33.33%;
    height: 400px;
    object-fit: cover;
}

@keyframes slide {
    0% { transform: translateX(0); }
    33% { transform: translateX(-33.33%); }
    66% { transform: translateX(-66.66%); }
    100% { transform: translateX(0); }
}

/* 商品分类样式 */
.categories {
    padding: 30px 0;
    background-color: white;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.categories h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.category-list {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.category-item {
    width: 18%;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.category-item p {
    font-size: 16px;
    color: #666;
}

/* 商品列表样式 */
.products {
    padding: 30px 0;
    background-color: white;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.products h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-img {
    height: 200px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
    color: #333;
}

.product-price {
    color: #ff6700;
    font-size: 18px;
    font-weight: bold;
}

.add-to-cart {
    display: block;
    width: 100%;
    padding: 8px 0;
    background-color: #ff6700;
    color: white;
    border: none;
    border-radius: 3px;
    margin-top: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #e55c00;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

.footer p {
    margin: 0;
    font-size: 14px;
}

